package com.ziqikeji.restdemo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dpf
 */
@RestController
@RequestMapping("restdemo")
public class RestDemoController {

    @Value("${server.port}")
    private int port;

    @RequestMapping("index")
    public String index() {
        System.out.println(this.port);
        return "hello world";
    }

    public void setPort(int port) {
        this.port = port;
    }
}
